package com.chapala.interviewquestions;

public class UniqueCharsCheck {

	public boolean containsUniqueChars(String stringTocheckForUniqueChars){
		if(stringTocheckForUniqueChars==null)
		  return true;
		boolean[] charset = new boolean[256];// default is false
		for(int i=0;i<stringTocheckForUniqueChars.length();i++){
			int asciiVal =  stringTocheckForUniqueChars.charAt(i)-'a';
			if(charset[asciiVal]==true) return false;
			charset[asciiVal]=true;
		}
		return true;
	}
}
